//
//  ViewController.swift
//  Emoticon_Keyboard
//
//  Created by 杨振 on 15/10/17.
//  Copyright © 2015年 杨振. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    // 键盘输入视图 - 默认键盘高度 216
    private lazy var emoticonVC: YZEmoticonViewController = YZEmoticonViewController { [weak self] (emoticon) -> () in
        
        self?.textView.insertEmoticon(emoticon)
    }
    
    @IBAction func emoticonText(sender: AnyObject) {
        
        print(textView.emoticonText())
    }
    
    @IBOutlet weak var textView: UITextView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
       
        // 设置自定义输入键盘
        textView.inputView = emoticonVC.view
    }
    
    deinit {
        print("88")
    }
    

}

